package com.burt.factory.abstr;

import com.burt.factory.AdSms;
import com.burt.factory.NotifySms;
import com.burt.factory.VerificationSms;

/**
 * Description:虚拟工厂
 * User: Burt
 * Date: 2017-05-23
 * Time: 21:40
 */
public abstract class AbstractFactory {
    protected abstract void senSMS();
    public void senSMS(int type){
        switch (type){
            case 1:
                 new VerificationSms().sendSMS();
                 break;
            case 2:
                 new NotifySms().sendSMS();
                break;
            case 3:
                 new AdSms().sendSMS();
                break;
            default:
                System.out.println("短信类型不正确");
        }
    }
}
